package hello;

import org.antlr.v4.runtime.ANTLRInputStream;
import org.antlr.v4.runtime.CharStream;
import org.antlr.v4.runtime.CharStreams;
import org.antlr.v4.runtime.CommonTokenStream;

/**
 * @author Ping
 * @date 2022/5/15 23:05
 **/
public class HelloTest {
    public static void main(String args[]) {
        CharStream input = CharStreams.fromString("Hello zhangsan") ;
        helloLexer lexer = new helloLexer(input) ;
        CommonTokenStream tokens = new CommonTokenStream(lexer) ;
        helloParser parser = new helloParser(tokens) ;
        helloParser.RContext tree = parser.r() ;

        NamehelloVisitor visitor = new NamehelloVisitor() ;
        visitor.visitR(tree) ;
    }
}
